package com.xiaohui.gwc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaohui.gwc.mode.Products;
import com.xiaohui.gwc.mode.ShopCart;
import com.xiaohui.gwc.mode.Shopping_cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: Poppin
 * @Date: 2021/11/30 12:33
 * @Version: 1.0
 */
@Mapper
public interface Shopping_cartMapper extends BaseMapper<Shopping_cart> {

    List<ShopCart> getAllShopCart(Integer jwt_user);

    @Select("SELECT p.pid ,p.pname ,p.price ,p.pic ,p.author ,p.press ,p.pubdate FROM products p ,recomn r WHERE p.pid = r.proid AND r.jwtuser_id = #{jwt_user}")
    List<Products> getRecomn(Integer jwt_user);
}
